import 'package:flutter/material.dart';
import 'package:xuance/constant.dart';

class WarningLevelWidget extends StatelessWidget {
  final String title;
  final String value;
  final Color dividerColor;

  const WarningLevelWidget(
      {super.key,
      required this.title,
      required this.value,
      required this.dividerColor});
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 10),
      child: Column(children: [
        IntrinsicHeight(
            child: Row(mainAxisSize: MainAxisSize.min, children: [
          VerticalDivider(
              color: dividerColor, thickness: 3, indent: 2, endIndent: 2),
          Text(title, style: const TextStyle(fontSize: 12, color: Colors.white))
        ])),
        const SizedBox(height: 10),
        Row(children: [
          Text(value,
              style: TextStyle(
                  color: c_green, fontWeight: FontWeight.bold, fontSize: 16)),
          const Text("次",
              style: TextStyle(color: Color(0xff9EA1A6), fontSize: 12))
        ])
      ]),
    );
  }
}
